# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-annotated-types
pkgver=0.6.0
pkgrel=1
pkgdesc="Reusable constraint types to use with typing.Annotated"
url="https://github.com/annotated-types/annotated-types"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-hatchling py3-wheel py3-installer"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/annotated-types/annotated-types/archive/refs/tags/v$pkgver/py3-annotated-types-$pkgver.tar.gz"
builddir="$srcdir/annotated-types-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
c4125cdfdc6a16561ac885c97b4300ebe8fe36c0b3ebdf59429002734bf77afb88ffe6c7aa03fdb9a0e5c793c55d3cf825695f1a2d279abf6f366a945447959d  py3-annotated-types-0.6.0.tar.gz
"
